import {routes,resetRouter} from '@/router'

const state ={
    menuList:[...routes]
}
const mutations ={
    setRouter(state,dynamicRouters){
        state.menuList = [...routes,...dynamicRouters]
    },
    clearRouter(state){
        state.menuList = []
        resetRouter()
    }
}

export default {
    namespaced:true,
    state,
    mutations
}